QuickTime 4 API Documentation

Inside Macintosh: QuickTime Components

Previous | Overview | Contents | Next |

Configuring Sequence Grabber Channel Components

Sequence grabber components use a number of functions to establish the environment for grabbing or previewing digitized data. This section describes the channel component functions that allow the sequence grabber component to establish the environment for recording or previewing captured data.

The sequence grabber component uses the SGInitChannel function to initialize your channel prior to a record or preview operation.

The SGSetGWorld function allows the sequence grabber component to assign a graphics world to your component.

SGInitChannel

A sequence grabber component calls the SGInitChannel function to initialize a sequence grabber channel component. Your component should perform its initialization processing here, rather than in response to the Component Manager's open request. The initialization processing may include allocating memory or checking for the availability of special-purpose hardware or software.

pascal ComponentResult SGInitChannel (SGChannel c,
                                         SeqGrabComponent owner);
c
Identifies the channel connection for this operation.

owner
Identifies the sequence grabber component that has connected to your channel component. You should save this value so that your channel component can call the utility functions that are provided by the sequence grabber component (see "Utility Functions for Sequence Grabber Channel Components," which begins on Utility Functions for Sequence Grabber Channel Components , for information about these utility functions).

DESCRIPTION

If your component cannot gain access to the resources or equipment it needs to function properly, you should return a nonzero result code. If you return a nonzero result, the sequence grabber component closes its connection to your component and reports the error to the calling application.

RESULT CODES

noDeviceForChannel

-9400

Channel component cannot find its device

File Manager errors Memory Manager errors

SGSetGWorld

A sequence grabber component calls the SGSetGWorld function to establish the display environment for your channel component.

pascal ComponentResult SGSetGWorld (SeqGrabComponent s,
                                         CGrafPtr gp, GDHandle gd);
s
Identifies the sequence grabber component that has connected to your channel component.

gp
Specifies the destination graphics port. The sequence grabber component always sets this parameter to a valid value. The specified graphics port must be a color graphics port. The parameter is set to nil to use the current graphics port.

gd
Specifies the destination graphics device. The sequence grabber component always sets this parameter to a valid value.

DESCRIPTION

Note that sequence grabber components may call this function for sound channel components as well as for video channel components.

RESULT CODE

cantDoThatInCurrentMode

-9402

Request invalid in current mode


© 1999 Apple Computer, Inc.

Previous | Overview | Contents | Next